package main

import (
	"fmt"
)

func main() {
	m:=map[string]int{
		"name":1,
		"age":2,
		"pp":3,
		"p":4,
		"ppp":5,
	}
	fmt.Println(m)


	m2:=make(map[string]string)
	fmt.Println(m2)

	var m3 map[string]string

	fmt.Println(m3)



	for k,v:=range m{
		fmt.Println(k,v)
	}


	age:=m["age" ]
	fmt.Println(age)


	if age1,ok:=m["age2"];ok{
		fmt.Println("age1:",age1)
	}else{
		fmt.Println("ok:",ok)
	}



	fmt.Println("删除")
	age3,ok3:=m["age" ]
	fmt.Println(age3,ok3)
	delete(m,"age" )
	fmt.Println(m)
}

